<style>
    .upload-image {
        background: url('__CDN__/assets/addons/example/img/plus.png') no-repeat center center;
        background-size: 35px 35px;
        height: 35px;
        width: 35px;
        border: 1px solid #ccc;
    }

    textarea.form-control {
        background: #eee;
    }
</style>
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Category_id')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-category_id" data-rule="required"-->
<!--                   data-source="category/selectpage"-->
<!--                   data-params='{"custom[type]":"goods"}'-->
<!--                   class="form-control selectpage" name="row[category_id]"-->
<!--                   type="text" value="">-->
<!--        </div>-->
<!--    </div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text">
        </div>
    </div>
    
<!--   <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('副名称')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-describe" data-rule="required" class="form-control" name="row[describe]" type="text">-->
<!--        </div>-->
<!--    </div>-->


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('封面图')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-image" class="form-control" size="50" name="row[image]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-image" class="btn btn-danger faupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" ><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-image"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-image"></ul>
        </div>
    </div>


    <div id="putong1" class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-images" class="form-control" size="50" name="row[images]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-images" class="btn btn-danger faupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-images"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-images"></ul>
        </div>
    </div>

    <div class="form-group ">
           <label class="control-label col-xs-12 col-sm-2">{:__('价格')}:</label>
           <div class="col-xs-12 col-sm-8">
               <input id="c-original_price" data-rule="required" class="form-control" step="0.01" name="row[original_price]" type="number" value="0.00">
           </div>
    </div>
    <div class="form-group hidden">
        <label data-favisible="status=1" class="control-label col-xs-12 col-sm-2">{:__('会员价')}:</label>
        <label data-favisible="status=2" class="control-label col-xs-12 col-sm-2">{:__('拼团价')}:</label>

        <div class="col-xs-12 col-sm-8">
            <input id="c-price" data-rule="required" class="form-control" step="0.01" name="row[price]" type="number" value="0.00">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                {foreach name="statusList" item="vo"}
                <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label>
                {/foreach}
            </div>

        </div>
    </div>

<!--    <div class="form-group">-->
<!--    <label class="control-label col-xs-12 col-sm-2">{:__('体验课程')}:</label>-->
<!--    <div class="col-xs-12 col-sm-8">-->
<!--        <div class="input-group">-->
<!--            <input id="c-vediofile" class="form-control" size="50" name="row[vediofile]" type="text">-->
<!--            <div class="input-group-addon no-border no-padding">-->
<!--                <span><button type="button" id="plupload-vediofile" class="btn btn-danger plupload" data-input-id="c-vediofile" data-mimetype="mp4,avi,wmv" data-multiple="false" data-maxsize="50M"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>-->
<!--                <span><button type="button" id="fachoose-vediofile" class="btn btn-primary fachoose" data-input-id="c-vediofile" data-mimetype="mp4,avi,wmv" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>-->
<!--            </div>-->
<!--            <span class="msg-box n-right" for="c-vediofile"></span>-->
<!--        </div>-->
<!--    </div>-->
<!--</div>-->
    <!-- <div class="form-group" data-favisible="status=2">
        <label class="control-label col-xs-12 col-sm-2">{:__('拼团价格')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-group_price"  class="form-control" step="0.01" name="row[group_price]" type="number" value="">
        </div>
    </div>
    <div class="form-group" data-favisible="status=2">
        <label class="control-label col-xs-12 col-sm-2">{:__('拼团人数')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-group_num"  class="form-control" step="0.01" name="row[group_num]" type="number" value="">
        </div>
    </div> -->

    <!--    添加商品规格-->
    <div class="form-group row">
        <label class="control-label col-xs-12" style="text-align:left;">{:__('添加商品规格')}:</label>
        <div class="col-xs-12">
            <table class="table fieldlist" data-template="specstpl" data-name="row[event]" id="first-table">
                <tr>
                    <td>{:__('名称')}</td>
                    <!--                    <td>{:__('描述')}</td>-->
                    <td>{:__('轮播图')}</td>
                    <td>{:__('库存')}</td>
                    <td>{:__('价格')}</td>
                    <td>{:__('成本')}</td>
                    <td width="100"></td>
                </tr>
                <tr>
                    <td colspan="5"><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></td>
                </tr>
            </table>

            <!--请注意实际开发中textarea应该添加个hidden进行隐藏-->
            <textarea name="row[event]" class="form-control hidden" cols="30" rows="5">[{"name":"","images":"","stock":"","price":"","money2":""}]</textarea>
            <script id="specstpl" type="text/html">
                <tr class="form-inline">
                    <td><input data-rule="required" style="width: 100px;"  type="text" name="<%=name%>[<%=index%>][name]" class="form-control" size="15" value="<%=row.name%>" placeholder="名称"/></td>
                    <!--                    <td><input style="width: 90px;" type="text" name="<%=name%>[<%=index%>][intro]" class="form-control" size="15" value="<%=row.intro%>" placeholder="描述"/></td>-->
                    <td><input data-rule="required" class="data-img form-control  hidden"
                               id="c-specs_images-<%=index%>" type="text"
                               name="<%=name%>[<%=index%>][images]"
                               style="width:150px"  size="15" value="<%=row.images%>"
                               placeholder="轮播图"/>
                        <button  type="button" id="specs_images" class="btn btn-danger faupload"
                                 data-input-id="c-specs_images-<%=index%>"
                                 data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp"
                                 data-multiple="true"
                                 data-preview-id="p-specs_images-<%=index%>"  >
                            <i class="fa fa-upload"></i> {:__('Upload')}
                        </button>
                        <ul class="row list-inline faupload-preview" style="width: 400%"
                            id="p-specs_images-<%=index%>"></ul>
                    </td>
                    <td><input data-rule="required" style="width: 80px;" type="text" name="<%=name%>[<%=index%>][stock]" class="form-control" size="15" value="<%=row.stock%>" placeholder="库存"/></td>
                    <td><input data-rule="required" style="width: 80px;" type="text" name="<%=name%>[<%=index%>][price]" class="form-control" size="15" value="<%=row.price%>" placeholder="价格"/></td>
                    <td><input data-rule="required" style="width: 80px;" type="text" name="<%=name%>[<%=index%>][money2]" class="form-control" size="15" value="<%=row.money2%>" placeholder="成本"/></td>
                    <td>
                        <!--下面的两个按钮务必保留-->
                        <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                        <!--                        上下排序按钮-->
                        <!--                        <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>-->
                    </td>
                </tr>
            </script>
        </div>
    </div>
    <!--    添加商品规格-->


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" class="form-control editor" rows="5" name="row[content]" cols="50"></textarea>
        </div>
    </div>
    <div class="form-group hidden">
        <label class="control-label col-xs-12 col-sm-2">{:__('Employ_ids')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-employ_ids"
                   data-source="employ/index"
                   data-multiple="true" class="form-control selectpage"
                   name="row[employ_ids]" type="text" value="">
        </div>
    </div>
    <!-- <div class="form-group"> -->
        <!-- <label class="control-label col-xs-12 col-sm-2">{:__('佣金')}:</label> -->
        <!-- <div class="col-xs-12 col-sm-8"> -->
            <!-- <input id="c-money" data-rule="required" class="form-control" step="0.01" name="row[money]" type="number" value="0.00"> -->
        <!-- </div> -->
    <!-- </div> -->

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('首页推荐')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input  id="c-switch" name="row[suggest]" type="hidden">
            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-switch" data-yes="1" data-no="0" >
                <i class="fa fa-toggle-on text-success fa-flip-horizontal text-gray fa-2x"></i>
            </a>
        </div>
    </div>


    <!--<div class="form-group">-->
    <!--    <label class="control-label col-xs-12 col-sm-2">{:__('是否新品')}:</label>-->
    <!--    <div class="col-xs-12 col-sm-8">-->
    <!--        <input  id="c-is_new" name="row[is_new]" type="hidden">-->
    <!--        <a href="javascript:;" data-toggle="switcher" class="btn-switcher"-->
    <!--           data-input-id="c-is_new" data-yes="1" data-no="0" >-->
    <!--            <i class="fa fa-toggle-on text-success fa-flip-horizontal text-gray fa-2x"></i>-->
    <!--        </a>-->
    <!--    </div>-->
    <!--</div>-->

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number" value="0">
        </div>
    </div>
    <!--<div class="form-group">-->
    <!--    <label class="control-label col-xs-12 col-sm-2">{:__('Freight_id')}:</label>-->
    <!--    <div class="col-xs-12 col-sm-8">-->
    <!--        <input id="c-freight_id" data-rule="required" data-source="freight/index" class="form-control selectpage" name="row[freight_id]" type="text" value="">-->
    <!--    </div>-->
    <!--</div>-->
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('客服地址')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-service_url"  class="form-control" name="row[service_url]" type="text" value="">-->
<!--        </div>-->
<!--    </div>-->

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>

    
